package com.leejie.controller;

import com.leejie.bean.HelloBean;
import com.leejie.service.HelloService;
import com.leejie.utils.JsonUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;

@Controller
public class HelloController {

    @Autowired
    private HelloService helloService;

    @ResponseBody
    @RequestMapping("/getUser")
    public List<HashMap<String, Object>> selectUser() throws Exception {
        List<HashMap<String, Object>> hashMaps = helloService.selectUser();
        HashMap<String, Object> map = new HashMap<>();
        map.put("hello","你好");
        hashMaps.add(map);
        return hashMaps;
    }

}
